<template>
  <div class="base-container">
    <el-container>
      <el-header>
        <head-nav></head-nav>
      </el-header>
      <el-container>
        <el-aside :width="!isCollapse?'180px':'60px'">
          <nav-menu @isCollapse="handleIsCollapse"></nav-menu>
        </el-aside>
        <el-container>
          <el-main>
            <bread-crumb></bread-crumb>
            <router-view/>
          </el-main>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>
<script>
import NavMenu from '@/views/menu/NavMenu'
import HeadNav from '@/views/menu/HeadNav'
import BreadCrumb from '@/views/menu/BreadCrumb'
export default {
  name: 'container',
  components: { NavMenu, HeadNav, BreadCrumb },
  data () {
    return {
      isCollapse: false
    }
  },
  methods: {
    handleIsCollapse (val) {
      this.isCollapse = val
    }
  }
}
</script>
<style lang="less">
  .base-container {
    width: 100%;
    height: 100%;
    .el-header {
      background-color: rgb(67, 74, 80);
      text-align: center;
      line-height: 60px;
    }
    .el-aside {
      text-align: center;
      line-height: 200px;
    }
    .el-container, .el-menu {
      width: 100%;
      height: 100%;
    }
  }
</style>
